<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h1>{{message}}</h1>
    <!--
        1.这里方法不写()也可以
        2.v-on:可以简写成@   (有的浏览器不支持)
    -->
    <button @click="sayHi">点击输出</button>
    <button v-on:click="sayOk()">点击输出</button>
    <button v-on:click="f1()">点击输出</button>
    <button v-on:click="sayHi()">点击输出</button>

</div>
<script src="vue.js"></script>
<script>
  let vm=new Vue({
    el:"#app",
    data:{
        message:"Vue事件的处理案例"
    },
    methods:{
      sayHi(){
        console.log("hi,银角大王")
      },
      sayOk(){
        console.log("hi,金角大王")
      },
      f1(){
        console.log(this.message)
      }
    }
  })
</script>
</body>
</html>